package com.yzy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@TableName("t_file")
@Data
public class File extends Model<File> {

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField("name")
    private String name;

    @TableField("real_path")
    private String realPath;

    @TableField("path")
    private String path;

    @TableField("real_name")
    private String realName;

    @TableField("upload_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date uploadTime;

    @TableField("file_type")
    private Integer fileType;

    @TableField("download_count")
    private Integer downloadCount;

    @TableField("upload_user_id")
    private Integer uploadUserId;
}
